package com.selfdiscipline.domain.repository

import com.selfdiscipline.data.local.entity.TimeRecordEntity
import kotlinx.coroutines.flow.Flow
import java.time.LocalDateTime

interface TimeRecordRepository {
    
    fun getAllTimeRecords(): Flow<List<TimeRecordEntity>>
    
    fun getCompletedTimeRecords(): Flow<List<TimeRecordEntity>>
    
    fun getActiveTimeRecords(): Flow<List<TimeRecordEntity>>
    
    fun getTimeRecordsInRange(startDate: LocalDateTime, endDate: LocalDateTime): Flow<List<TimeRecordEntity>>
    
    suspend fun getTimeRecordById(recordId: Long): TimeRecordEntity?
    
    suspend fun insertTimeRecord(timeRecord: TimeRecordEntity): Long
    
    suspend fun updateTimeRecord(timeRecord: TimeRecordEntity)
    
    suspend fun deleteTimeRecord(timeRecord: TimeRecordEntity)
    
    suspend fun deleteTimeRecordById(recordId: Long)
    
    suspend fun getTotalDurationInRange(startDate: LocalDateTime, endDate: LocalDateTime): Long?
} 